Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Objects /
Chapter 7 - View-Related Objects / View-Related Objects Reference
View Port Functions / Creating and Manipulating View Port Objects


GXNewViewPort

You can use the GXNewViewPort function to create a new view port.

gxViewPort GXNewViewPort(gxViewGroup group);
group
A reference to the view group in which to create the view port.
function result
A reference to the newly created view port.
DESCRIPTION
The GXNewViewPort function creates a new view port with default properties and assigns it to the specified view group. All other properties are set to their default values:

To create a view port in the onscreen view group, pass the value gxScreenViewDevices for the group parameter. To obtain an offscreen view
group reference to pass to this function, use the GXNewViewGroup function.

SPECIAL CONSIDERATIONS
If no error occurs, the GXNewViewPort function creates a view port object; you are responsible for disposing of that object when you no longer need it.

ERRORS, WARNINGS, AND NOTICES
Errors 
out_of_memory 
invalid_viewGroup_reference
SEE ALSO
For examples of the use of this function, see page 7-41, Listing 7-5 on page 7-47, and Listing 7-14 on page 7-63.

To dispose of a view port, use the GXDisposeViewPort function, described next. To dispose of all the view ports in a view group, use the GXDisposeViewGroup function, described on page 7-122.

The gxScreenViewDevices view group reference is described in the section "View Group Types" on page 7-69. The GXNewViewGroup function is described on page 7-122.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996